$(function(){
    // MENUS
    $('#portal_menu').menu({
            content: $('#portal_menu_options').html(), // grab content from this page
            showSpeed: 400,
            width : 200
    });

    $('#header_menu').menu({
            content: $('#header_menu_options').html(), // grab content from this page
            showSpeed: 400,
            width : 200
    });

    $('#footer_menu').menu({
            content: $('#footer_menu_options').html(), // grab content from this page
            showSpeed: 400,
            width : 200
    });

    $('.section_menu').each(function(index,element){
        $(element).menu({
            content: $(element).next().html(), // grab content from this page
            showSpeed: 400,
            width : 200
        })
    });

    $('.element_menu').each(function(index,element){
        $(element).menu({
            content: $(element).next().html(), // grab content from this page
            showSpeed: 400,
            width : 200
        })
    });

    $('.content_menu').each(function(index,content){
        $(content).menu({
            content: $(content).next().html(), // grab content from this page
            showSpeed: 400,
            width : 200
        })
    });
})

function activateTreeMenu(){
    // MENUS
    $('#portal_menu').menu({
            content: $('#portal_menu_options').html(), // grab content from this page
            showSpeed: 400,
            width : 200
    });

    $('#header_menu').menu({
            content: $('#header_menu_options').html(), // grab content from this page
            showSpeed: 400,
            width : 200
    });

    $('#footer_menu').menu({
            content: $('#footer_menu_options').html(), // grab content from this page
            showSpeed: 400,
            width : 200
    });

    $('.section_menu').each(function(index,element){
        $(element).menu({
            content: $(element).next().html(), // grab content from this page
            showSpeed: 400,
            width : 200
        })
    });

    $('.element_menu').each(function(index,element){
        $(element).menu({
            content: $(element).next().html(), // grab content from this page
            showSpeed: 400,
            width : 200
        })
    });

    $('.content_menu').each(function(index,content){
        $(content).menu({
            content: $(content).next().html(), // grab content from this page
            showSpeed: 400,
            width : 200
        })
    });
}
